package com.system.vote.admin.controller;

import com.system.vote.admin.annotation.GlobalInterceptor;
import com.system.vote.core.annotation.VerifyParam;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController
@RequestMapping("/test")
public class LoginController {
    @GetMapping("/login")
    @GlobalInterceptor
    public void login(HttpServletRequest request,
                      @VerifyParam(required = true) String username,
                      @VerifyParam(min = 5, max = 20) String password,
                      @VerifyParam(required = true) String checkCode) {

    }
}
